package com.xhui.vimarket.zkplus.callback.impl;

import java.util.HashMap;

import org.apache.log4j.Logger;

import com.xhui.vimarket.zkplus.callback.EvtCallback;



/**
 * EvtCallbackImpl.
 * 
 * @author wuyx
 * @version Revision 1.0.0
 * 
 */
public class EvtCallbackImpl implements EvtCallback {
    /**
     * 调用函数标记.
     */
    public static final String CALLBACK = "callback";
    /**
     * 调用来源.
     */
    public static final String CALLFROM = "callfromid";
    
    /**
     * logger.
     */
    private static Logger      logger   = Logger.getLogger(EvtCallbackImpl.class);
    
    /**
     * .
     * 
     * @param callback Object
     * @param callflag String
     * @return Map<String, Object>
     * @author wuyx
     * 2011-1-25 wuyx 
     */
    public static HashMap<String, Object> newArg(final String callflag, final EvtCallback callback) {
        final HashMap<String, Object> args = new HashMap<String, Object>();
        args.put(EvtCallbackImpl.CALLBACK + "___" + callflag, callback);
        return args;
    }
    
    /**
     * genKey.
     * 
     * @param callflag String
     * @return String
     * @author wuyx
     * 2011-3-25 wuyx 
     */
    public static String genKey(final String callflag) {
        return EvtCallbackImpl.CALLBACK + "___" + callflag;
    }
    
    /**
     * callback.
     * @param object Obcom.xhui.vimarket.zkplusee com.xhui.vimarket.zkplus.callback.EvtCallback#callback(java.lang.String, java.lang.Object)
     */
    @Override
    public void callback(final Object object) {
        EvtCallbackImpl.logger.debug("def logger impl");
    }
    
}
